const koa = require('koa')
const app = new koa()

let mid1 = (ctx, next) => {
    console.log('我是第一个')
    console.log(ctx.url)
    next()
}

let mid2 = (ctx, next) => {
    console.log('我是第二个')
    console.log(ctx.method)
    next()
}

app.use(mid1)
app.use(mid2)

app.listen(3000, () => {
    console.log('running at 3000')
})